<?php
/**
 * Fastapp.
 * 3/7/24
 * @Author deepsea
 * @Contact telegram:deepsea159
 */


namespace App\Fastapp\Api\Controller\Cms;


use App\Fastapp\Api\Controller\ApiController;
use App\Fastapp\Api\Service\Cms\PositionService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Psr\Http\Message\ResponseInterface;

#[Controller(prefix: "api/cms/position")]
class PositionController extends ApiController
{
    #[Inject]
    protected PositionService $service;

    #[GetMapping("detail")]
    public function detail(): ResponseInterface
    {
        return $this->success($this->service->detail($this->request->input('code')));
    }

    #[GetMapping("ad")]
    public function ad(): ResponseInterface
    {
        return $this->success($this->service->ad($this->request->input('code')));
    }

    #[GetMapping("multi")]
    public function multi(): ResponseInterface
    {
        return $this->success($this->service->multi($this->request->input('code')));
    }
}